{extend name="../../admin/view/public/admin"}

{block name='content'}


<style>
    .multi-item {
        margin-bottom: 18px;
    }
</style>


<div class="page-header">
    当前位置：<span class="text-primary">{if !empty($item)}编辑{else}新建{/if}分类
    	<small>{if !empty($item)}(名称: {$item['company']}){/if}</small>
    </span>
</div>

<div class="page-content">

    <form action="" method="post" class="form-validate form-horizontal ">
        <input type="hidden" name="id" value="{$item['id']}"/>
        <input type="hidden" name="type" value="{$type}"/>

        <div class="form-group-title">分类基本信息</div>

        <div class="form-group">
            <label class="col-lg control-label must">排序</label>
            <div class="col-sm-9 col-xs-12">
                <input type="text" name="displayorder" class="form-control" value="{:intval($item['displayorder'])}" data-rule-required='true'/>
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label must">分类名称</label>
            <div class="col-sm-9 col-xs-12">
                <input type="text" name="name" class="form-control" value="{$item['name']}" data-rule-required='true'/>
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label">显示模板类型</label>
            <div class="col-sm-9 col-xs-12">
                <label class="radio-inline">
                    <input type="radio" name="style_type" value="1" {if $item['style_type']==1}checked="checked"{/if}>  上下图文(无时间)
                </label>
                <label class="radio-inline">
                    <input type="radio" name="style_type" value="2" {if $item['style_type']==2}checked="checked"{/if}> 上下图文(有时间)
                </label>
                <label class="radio-inline">
                    <input type="radio" name="style_type" value="3" {if $item['style_type']==3}checked="checked"{/if}> 左右图文(左图长方形)
                </label>
                <label class="radio-inline">
                    <input type="radio" name="style_type" value="4" {if $item['style_type']==4}checked="checked"{/if}> 左右图文(左图正方形)
                </label>
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label">显示状态</label>
            <div class="col-sm-9 col-xs-12">
                <label class="radio-inline">
                    <input type="radio" name="enabled" value="1" {if $item['enabled']==1}checked="checked"{/if}> 显示
                </label>
                <label class="radio-inline">
                    <input type="radio" name="enabled" value="0" {if $item['enabled']==0 || empty($item)}checked="checked"{/if}> 隐藏
                </label>
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label"></label>
            <div class="col-sm-9">
                <input type="hidden" name="backUrl" value="{:webUrl('article.category/main')}">
                <input type="submit" class="btn btn-primary" value="保存">
                <a class="btn btn-default" href="{:webUrl('article.category/main')}">返回列表</a>
            </div>
        </div>

    </form>
</div>


{/block}